<?php


namespace App\Models;

use App\User;

class Cate extends BaseModel
{
    protected $table = 'categories';

    public static function getSotreListById($id)
    {
        $list = self::where('parent_id', $id)
            ->get()
            ->toArray();
        foreach($list as &$val){
            $val['user'] = User::getAdminUser($val['id'],2)?:'';
        }
        return $list;
    }
}